package com.maimao.kill.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.kill.dto.KillDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author MaoLin Wang
 * @date 2021/4/17 5:35 下午
 */
@RequestMapping("/order")
@FeignClient(value = ServiceContainer.ORDER_SERVICE, configuration = FeignInterceptor.class)
public interface OrderClient {

    /**
     * 提交秒杀订单
     *
     * @param dto
     * @return
     */
    @PostMapping("/client/submitKillOrder")
    Result killOrder(@RequestBody KillDto dto);
}
